﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace KitBuildingWF.Models
{
    public partial class Stock
    {
        public Stock() { }

        public Stock(Dictionary<string, string> stockProperties)
        {
            if (stockProperties.ContainsKey("ProductCode"))
            {
                productCode = stockProperties["ProductCode"];
            }

            if (stockProperties.ContainsKey("StockIn")){
                stockIn = Convert.ToInt32(stockProperties["StockIn"]);
            }

            if (stockProperties.ContainsKey("Location"))
            {
                location = stockProperties["Location"];
            }

            if (stockProperties.ContainsKey("Group"))
            {
                group = stockProperties["Group"];
            }

            if (stockProperties.ContainsKey("Description"))
            {
                description = stockProperties["Description"];
            }

            if (stockProperties.ContainsKey("BackOrder"))
            {
                backOrder = Convert.ToInt32(stockProperties["BackOrder"]);
            }
        }
    }
}
